<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>AJAX Solr</title>
  <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  <link rel="stylesheet" type="text/css" href="css/common.css" media="screen" />
  <link href="css/fileuploader.css" rel="stylesheet" type="text/css">	
  
 <script src="js/jquery-1.7.1.min.js"></script>
  <script type="text/javascript" src="js/glabCorpus.js"></script>
  <script type="text/javascript" src="js/core/Core.js"></script>

  <script type="text/javascript" src="js/core/AbstractManager.js"></script>
  <script type="text/javascript" src="js/managers/Manager.jquery.js"></script>
  <script type="text/javascript" src="js/core/Parameter.js"></script>
  <script type="text/javascript" src="js/core/ParameterStore.js"></script>
  <script type="text/javascript" src="js/core/AbstractWidget.js"></script>
  <script type="text/javascript" src="js/widgets/ResultWidget.js"></script>
  <script type="text/javascript" src="js/glabCorpus.theme.js"></script>
  <script type="text/javascript" src="js/helpers/jquery/ajaxsolr.theme.js"></script>
  <script type="text/javascript" src="js/jquery.livequery.js"></script>
  <script type="text/javascript" src="js/widgets/jquery/PagerWidget.js"></script>
  <script type="text/javascript" src="js/widgets/CurrentSearchWidget.js"></script>
  <script type="text/javascript" src="js/core/AbstractFacetWidget.js"></script>
  <script type="text/javascript" src="js/widgets/TextWidget.js"></script>
  <script src='js/jquery.form.js' type="text/javascript" ></script>
  <script src='js/jquery.MetaData.js' type="text/javascript" ></script>
  <script src='js/jquery.MultiFile.js' type="text/javascript" ></script>
  <script src='js/jquery.blockUI.js' type="text/javascript" ></script>
  <script src="js/fileuploader.js" type="text/javascript"></script>
  
  <script>        
        function createUploader(){            
            var uploader = new qq.FileUploader({
                element: document.getElementById('file-uploader'),
                action: 'Commonsfileuploadservlet',
                allowedExtensions: ['pdf','txt','odt','doc','docx','rtf','zip','ppt','htm','html','php','jsp'],
				onComplete:function(){ Manager.doRequest();}
            });           
        }
        
        // in your app create uploader as soon as the DOM is ready
        // don't wait for the window to load  
        window.onload = createUploader;     
    </script>
  </head>
<body>
  <div id="wrap"> 
    <div id="header">

      <h1>Gramlab Corpus</h1>
    </div>

    <div class="right">
	<div id="toolbar">
		<div id="selector"><input id="select_all" type="checkbox" value="all" /><span>Select All<span></div>
	</div>
	<div id="batch_action">
	<!--<img src="img/picto/batch_load_picto.png" alt="tei" title="Download selected documents" id="batch_load_picto"/>-->
	<div id="batch">
	<span id="tei_batch_picto"><img src="img/picto/TEI_down.gif" alt="tei" title="download selected TEI"/></span>
	<span id="download_batch_picto"><img src="img/picto/doc.gif" alt="download" title="download selected files"/></span>
	<span id="delete_batch_picto"><img src="img/picto/bin.png" alt="download" title="delete selected files"/></span>
	</div>
	</div>
      <div id="result">
        <div id="navigation">
          <ul id="pager"></ul>
          <div id="pager-header"></div>
		  <div id="selected-header"></div>
        </div>
        <div id="docs"></div>
      </div>
    </div>

    <div class="left">
      <h2>Current Selection</h2>
      <ul id="selection"></ul>

      <h2>Search</h2>
      <span id="search_help">(press ESC to close suggestions)</span>
      <ul id="search">
        <input type="text" id="query" name="query"/>
      </ul>
	  <h2>Upload Files</h2>
	  <div id="file-uploader">
			<form id="uploadform" method="post" enctype="multipart/form-data"  action="Commonsfileuploadservlet">
				<input type="file" name="images" id="images" multiple="true" class="multi"  accept="pdf|txt|odt|doc|docx|rtf|zip|ppt|htm|html|php|jsp"/>
				<button class="upload" type="submit" id="btn">Upload Files!</button>
			</form>
	  </div>

	<div id="file-uploader">       
    	<noscript>          
        	<p>Please enable JavaScript to use file uploader.</p>
        	<!-- or put a simple form for upload here -->
    	</noscript>         
	</div>
    </div>
    <div class="clear"></div>
	
	
  </div>  
</body>
</html>
